home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume5 / tess / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-12-14  |  21.8 KB

  1. Path: uunet!tektronix!tekgen!tekred!games
  2. From: games@tekred.TEK.COM
  3. Newsgroups: comp.sources.games
  4. Subject: v05i097:  tess - beyond the tesseract, an abstract adventure game, Patch1
  5. Message-ID: <3377@tekred.TEK.COM>
  6. Date: 14 Dec 88 21:39:44 GMT
  7. Sender: billr@tekred.TEK.COM
  8. Lines: 833
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted by: tale@pawl.rpi.edu (Dave Lawrence)
  12. Comp.sources.games: Volume 5, Issue 97
  13. Archive-name: tess/Patch1
  14.  
  15.     [[Note: this is the second version of these patches. If you got a
  16.       copy of this set of patches before the first article was canceled,
  17.       delete it and use this instead. -br]]
  18.  
  19.     [These patches have been approved by the original author for
  20.      distribution as official patches.  -br]
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of shell archive."
  29. # Contents:  Fixes patches01
  30. # Wrapped by billr@saab on Wed Dec 14 13:37:47 1988
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'Fixes' -a "${1}" != "-c" ; then 
  33.   echo shar: Will not clobber existing file \"'Fixes'\"
  34. else
  35. echo shar: Extracting \"'Fixes'\" \(1950 characters\)
  36. sed "s/^X//" >'Fixes' <<'END_OF_FILE'
  37. XBUGS
  38. X    o ^D (EOF) on stdin causes input routines to endlessly loop.
  39. X    o When the programme asks "What is the probability of getting
  40. X      the improbability?" the answer is assumed to contain a
  41. X      decimal point.  If none is entered, a signal SEGV occurs.
  42. X    
  43. XFIXES
  44. X    o A routine was added to parser.c named trapEOF and the eofgets()
  45. X      macro facilitates this call.  ^D now terminates the programme
  46. X      with exit code 1.
  47. X    o The input to the question now accepts forms of 50, 50.7, 0.50
  48. X      and 1/2, all returning a value equivalent to 50%.  Other input
  49. X      (1/,fifty percent) will simply be interpreted as 0.
  50. X
  51. XAESTHETIC CHANGES
  52. X    o A -f option was allowed.  This causes the programme to start
  53. X      in the researcher's office.  The title and instructions are skipped.
  54. X    o The prompt at the end of the title screen lets you skip the 
  55. X      instructions.
  56. X    o srand() is now randomized by the system clock.  It had been 
  57. X      randomized by the values returned from get_enter() at the
  58. X      first two screens, but this usually resulted in sum being
  59. X      always set to a value of 86 as most people don't type anything
  60. X      at a prompt that says to just press <enter>.
  61. X    o The code now passes the lint test.  It barfed in a big way
  62. X      with the original code as numerous return codes were not
  63. X      checked and some return values were inconsistent. The
  64. X      latter was caused by the absence of string.h; to keep
  65. X      portability, I included extern definitions to the
  66. X      common string functions used in the programme.  I don't
  67. X      know whether it will compile with Datalight (?) C
  68. X      as I don't have access to that compiler.  All casting
  69. X      to (void) will also have to be removed on compilers
  70. X      without void.
  71. X    o fgets replaced all gets calls because gets is inherently
  72. X      evil.
  73. X    o The printing of the title screen when exiting the programme
  74. X      has been removed.  It just isn't in the spirit of UNIX.  |:-)
  75. X--
  76. XDave Lawrence
  77. X      tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu
  78. END_OF_FILE
  79. if test 1950 -ne `wc -c <'Fixes'`; then
  80.     echo shar: \"'Fixes'\" unpacked with wrong size!
  81. fi
  82. # end of 'Fixes'
  83. fi
  84. if test -f 'patches01' -a "${1}" != "-c" ; then 
  85.   echo shar: Will not clobber existing file \"'patches01'\"
  86. else
  87. echo shar: Extracting \"'patches01'\" \(17604 characters\)
  88. sed "s/^X//" >'patches01' <<'END_OF_FILE'
  89. X*** tess2/parser.c    Mon Dec 12 17:34:04 1988
  90. X--- tess/parser.c    Tue Dec 13 23:30:25 1988
  91. X***************
  92. X*** 33,43 ****
  93. X--- 33,76 ----
  94. X        *str = tolower (*str);
  95. X    return (orig);
  96. X  }
  97. X+ 
  98. X+ int intlwr(c)
  99. X+ int c;
  100. X+ 
  101. X+ {
  102. X+   return (c = (isupper(c)) ? tolower(c) : c);
  103. X+ }
  104. X+ 
  105. X  /*----------------------- END of additions for portable version. */
  106. X  
  107. X+ char *trapEOF(s,stream)
  108. X+ char *s;
  109. X+ FILE *stream;
  110. X  
  111. X+ {
  112. X+   if (s == NULL) {
  113. X+     if (feof(stream)) {
  114. X+       prints("(EOF)");
  115. X+       exit(1);
  116. X+     } else {
  117. X+       perror("fgets: ");
  118. X+       exit(1);
  119. X+     }
  120. X+   }
  121. X+   return(s);
  122. X+ }
  123. X  
  124. X+ strip_nl(s)
  125. X+ char *s;
  126. X  
  127. X+ {
  128. X+   auto int i;
  129. X+   i = strlen(s); 
  130. X+   if (*(s+i-1)=='\n') *(s+i-1) = '\0'; /*  fgets is safer, but imbeds \n */
  131. X+ }
  132. X+   
  133. X+ #define eofgets(st, nu, fi) trapEOF(fgets(st,nu,fi), fi)
  134. X+ 
  135. X  #define v_sig 4               /* 1st 4 letters of vocab words significant */
  136. X  
  137. X  #define max_cmd_size 64                /* at most 63 chars per command */
  138. X***************
  139. X*** 88,99 ****
  140. X    q = strchr( cm, '\0');          /* get last char */
  141. X  
  142. X    if (!p)   p = q;                /* if 1 word, set ptr */
  143. X!   strncat( verb, cm, min(p-cm, max_word_len) );
  144. X  
  145. X    if (*p)                         /* if >1 word */
  146. X    {
  147. X      while (*p && *p==' ') p++;    /* skip lead blanks */
  148. X!     strncat( noun, p, min(q-p, max_word_len) );
  149. X    }
  150. X  }
  151. X  
  152. X--- 121,132 ----
  153. X    q = strchr( cm, '\0');          /* get last char */
  154. X  
  155. X    if (!p)   p = q;                /* if 1 word, set ptr */
  156. X!   (void)strncat( verb, cm, min(p-cm, max_word_len) );
  157. X  
  158. X    if (*p)                         /* if >1 word */
  159. X    {
  160. X      while (*p && *p==' ') p++;    /* skip lead blanks */
  161. X!     (void)strncat( noun, p, min(q-p, max_word_len) );
  162. X    }
  163. X  }
  164. X  
  165. X***************
  166. X*** 105,112 ****
  167. X    char *s;
  168. X  {
  169. X    int i;
  170. X! 
  171. X!   for ( i=strlen(s); i<v_sig; i++ )
  172. X      *(s+i) = ' ';
  173. X    *(s+v_sig)='\0';
  174. X  }
  175. X--- 138,145 ----
  176. X    char *s;
  177. X  {
  178. X    int i;
  179. X!   
  180. X!   for (i = strlen(s); i<v_sig; i++ )
  181. X      *(s+i) = ' ';
  182. X    *(s+v_sig)='\0';
  183. X  }
  184. X***************
  185. X*** 118,127 ****
  186. X    char *w;
  187. X    vocab_type *voc;
  188. X  {
  189. X!   int wn,i;
  190. X    v_word sh_word;
  191. X  
  192. X!   strcpy( sh_word, w );
  193. X    resize_word( sh_word );
  194. X    for ( wn=0;  *voc->name;  voc++ )
  195. X    {
  196. X--- 151,160 ----
  197. X    char *w;
  198. X    vocab_type *voc;
  199. X  {
  200. X!   int wn;
  201. X    v_word sh_word;
  202. X  
  203. X!   (void)strcpy( sh_word, w );
  204. X    resize_word( sh_word );
  205. X    for ( wn=0;  *voc->name;  voc++ )
  206. X    {
  207. X***************
  208. X*** 159,165 ****
  209. X    int nn;
  210. X  
  211. X    cprintf( prompt );
  212. X!   gets( noun );
  213. X    nn = GetNounNum( noun );
  214. X    resize_word( noun );
  215. X    return( nn );
  216. X--- 192,198 ----
  217. X    int nn;
  218. X  
  219. X    cprintf( prompt );
  220. X!   strip_nl(eofgets(noun,max_word_size,stdin));
  221. X    nn = GetNounNum( noun );
  222. X    resize_word( noun );
  223. X    return( nn );
  224. X***************
  225. X*** 172,186 ****
  226. X    CmdRec *cmd;
  227. X  {
  228. X    ParseCommand( cmd->cm,   cmd->verb, cmd->noun );
  229. X!   strlwr( cmd->verb );
  230. X!   strlwr( cmd->noun );
  231. X    cmd->vn = GetVerbNum( cmd->verb );
  232. X    cmd->nn = GetNounNum( cmd->noun );
  233. X  
  234. X!   strcpy( cmd->sh_verb, cmd->verb );
  235. X!   resize_word( cmd->sh_verb );
  236. X!   strcpy( cmd->sh_noun, cmd->noun );
  237. X!   resize_word( cmd->sh_noun );
  238. X  }
  239. X  
  240. X  
  241. X--- 205,219 ----
  242. X    CmdRec *cmd;
  243. X  {
  244. X    ParseCommand( cmd->cm,   cmd->verb, cmd->noun );
  245. X!   (void)strlwr( cmd->verb );
  246. X!   (void)strlwr( cmd->noun );
  247. X    cmd->vn = GetVerbNum( cmd->verb );
  248. X    cmd->nn = GetNounNum( cmd->noun );
  249. X  
  250. X!   (void)strcpy(cmd->sh_verb, cmd->verb);
  251. X!   resize_word(cmd->sh_verb);
  252. X!   (void)strcpy(cmd->sh_noun, cmd->noun);
  253. X!   resize_word(cmd->sh_noun);
  254. X  }
  255. X  
  256. X  
  257. X*** tess.1    Mon Dec 12 11:17:07 1988
  258. X--- tess/tess.1    Mon Dec 12 11:32:34 1988
  259. X***************
  260. X*** 3,7 ****
  261. X  tess - beyond the tesseract, an abstract adventure
  262. X  .SH SYNOPSIS
  263. X! tess
  264. X  .SH DESCRIPTION
  265. X  .SH Scenario:
  266. X--- 3,7 ----
  267. X  tess - beyond the tesseract, an abstract adventure
  268. X  .SH SYNOPSIS
  269. X! tess [-f]
  270. X  .SH DESCRIPTION
  271. X  .SH Scenario:
  272. X***************
  273. X*** 23,26 ****
  274. X--- 23,28 ----
  275. X  of each word are significant.  The adventure recognizes about 200 words,
  276. X  so if one word doesn't work, try another.
  277. X+ .SH OPTIONS
  278. X+ -f  Fast start-up; skip title, scenario and instructions.
  279. X  .SH Notes:
  280. X  .LP
  281. X
  282. X*** tess2/tess.c    Mon Dec 12 17:34:09 1988
  283. X--- tess/tess.c    Wed Dec 14 00:14:55 1988
  284. X***************
  285. X*** 7,15 ****
  286. X  
  287. X  /*
  288. X      Portable version      V2.0p  By Dennis Lo  10/30/88
  289. X  
  290. X      This version can compile with Datalight C 2.20, Microsoft C 5.0,
  291. X!     QuickC 1.0, Turbo C 1.5, Unix cc (SunOs 3.?), and GNU cc.
  292. X  
  293. X      - Changed ANSI-style function parameter declarations to K & R-style.
  294. X      - Removed #include <string.h> and added the string routines
  295. X--- 7,18 ----
  296. X  
  297. X  /*
  298. X      Portable version      V2.0p  By Dennis Lo  10/30/88
  299. X+                           V2.1p  patches by Dave Lawrence 12/14/88
  300. X+                      (fixed probability read, pass by
  301. X+                   long screens, EOF endless loops)
  302. X  
  303. X      This version can compile with Datalight C 2.20, Microsoft C 5.0,
  304. X!     QuickC 1.0, Turbo C 1.5, Unix cc (SunOs 3.?), GNU cc and *C87.
  305. X  
  306. X      - Changed ANSI-style function parameter declarations to K & R-style.
  307. X      - Removed #include <string.h> and added the string routines
  308. X***************
  309. X*** 31,40 ****
  310. X--- 34,48 ----
  311. X          will use Turbo-C screen manipulation library routines.  ******/
  312. X  #define tty
  313. X  
  314. X+ /****** quick alias for *C87 on MTS; loader only recognizes 8 chars. ****/
  315. X+ #define goto_new_lev GoNewLev
  316. X+ #define goto_new_loc GoNewLoc
  317. X  
  318. X  #include <ctype.h>
  319. X  /*#include <string.h>*/
  320. X  #include <stdio.h>
  321. X+ extern char *strcpy(), *strncat(), *strcat();
  322. X+ extern int strcmp();
  323. X  
  324. X  #define max(a,b) (((a) > (b)) ? (a) : (b))
  325. X  #define min(a,b) (((a) < (b)) ? (a) : (b))
  326. X***************
  327. X*** 46,61 ****
  328. X  */
  329. X  nl()  {  putchar('\n');  }
  330. X  
  331. X- /*----------------------------*/
  332. X- int get_enter()
  333. X- {
  334. X-   int i=0, ch;
  335. X  
  336. X-   while ((ch=getchar()) != '\n')
  337. X-     i+=ch;
  338. X-   return (i);
  339. X- }
  340. X- 
  341. X  /*----------------------------*/
  342. X  /* if tty-mode, then using standard library functions for I/O, and ignore the
  343. X     screen I/O functions
  344. X--- 54,60 ----
  345. X***************
  346. X*** 62,69 ****
  347. X  */
  348. X  #ifdef tty
  349. X  
  350. X! #  define cprintf printf
  351. X! #  define cputs printf
  352. X  #  define prints puts
  353. X  
  354. X  #  define clrscr()
  355. X--- 61,68 ----
  356. X  */
  357. X  #ifdef tty
  358. X  
  359. X! #  define cprintf (void)printf
  360. X! #  define cputs (void)printf
  361. X  #  define prints puts
  362. X  
  363. X  #  define clrscr()
  364. X***************
  365. X*** 88,93 ****
  366. X--- 87,93 ----
  367. X  
  368. X  #include "tess-def.c"
  369. X  #include "parser.c"
  370. X+ #include <sys/time.h>
  371. X  
  372. X  
  373. X  /*------------------------------------------------------------*/
  374. X***************
  375. X*** 126,131 ****
  376. X--- 126,133 ----
  377. X  InitAdv()
  378. X  {
  379. X    int i;
  380. X+   struct timeval tp;
  381. X+   struct timezone tzp;
  382. X  
  383. X    for ( i=1; i<MaxObjs; i++ )
  384. X    {
  385. X***************
  386. X*** 141,146 ****
  387. X--- 143,153 ----
  388. X  
  389. X    zap = cc = wa = ep = dr = af = gp = mi = ti = kp = 0;
  390. X  
  391. X+   if (gettimeofday(&tp,&tzp)==-1) {
  392. X+     perror("gettimeofday");
  393. X+     exit(1);
  394. X+   }
  395. X+   (void)srand ((int)tp.tv_sec);
  396. X    for ( sum=0, i=0; i<3; i++ )
  397. X      sum += (dc [i] = rand() & 31);
  398. X  
  399. X***************
  400. X*** 454,461 ****
  401. X    for ( i=1; i<MaxObjs; i++ )
  402. X      if ( ObjOnPlayer(i) )
  403. X      {
  404. X!       strcpy( s, obj[i].name );
  405. X!       if (WearingObj(i)) strcat( s, " (wearing)" );
  406. X        len = strlen(s);
  407. X        if (currx+ len + 3 > 78 ) { currx=0; nl(); }
  408. X        cprintf("  %s.", s );
  409. X--- 461,468 ----
  410. X    for ( i=1; i<MaxObjs; i++ )
  411. X      if ( ObjOnPlayer(i) )
  412. X      {
  413. X!       (void)strcpy ( s, obj[i].name );
  414. X!       if (WearingObj(i)) (void)strcat( s, " (wearing)" );
  415. X        len = strlen(s);
  416. X        if (currx+ len + 3 > 78 ) { currx=0; nl(); }
  417. X        cprintf("  %s.", s );
  418. X***************
  419. X*** 472,478 ****
  420. X  /*----------------------------*/
  421. X  do_get()
  422. X  {
  423. X!   int where, attr, i, get_flag;
  424. X    char s[16], *p;
  425. X  
  426. X    if (ObjOnPlayer(cmd.nn))
  427. X--- 479,485 ----
  428. X  /*----------------------------*/
  429. X  do_get()
  430. X  {
  431. X!   int i, get_flag;
  432. X    char s[16], *p;
  433. X  
  434. X    if (ObjOnPlayer(cmd.nn))
  435. X***************
  436. X*** 529,539 ****
  437. X      else if (cmd.nn==o_improb)   /* improbability */
  438. X      {
  439. X        cprintf("What is the probability of getting this improbability? ");
  440. X!       gets( s );
  441. X!       p = strchr( s, '.' );  /* skip past decimal point */
  442. X!       if (p) p++;
  443. X!       i = atoi( p );
  444. X!       if (i!=sum && i*10!=sum)
  445. X        {
  446. X          prints("Wrong.");
  447. X          get_flag = 0;
  448. X--- 536,548 ----
  449. X      else if (cmd.nn==o_improb)   /* improbability */
  450. X      {
  451. X        cprintf("What is the probability of getting this improbability? ");
  452. X!       strip_nl(eofgets(s,16,stdin));
  453. X!       if ((p=strchr(s,'.')) && atoi(s)==0)
  454. X!     i = atoi(p + 1);
  455. X!       else if (p = strchr(s,'/')) i = (i = atoi(p+1)) ? 
  456. X!     atoi(s)/(float)i * 100 : atoi(s);
  457. X!       else i = atoi(s);
  458. X!       if (i!=sum)
  459. X        {
  460. X          prints("Wrong.");
  461. X          get_flag = 0;
  462. X***************
  463. X*** 551,557 ****
  464. X  /*----------------------------*/
  465. X  do_drop()
  466. X  {
  467. X!   int where, i;
  468. X  
  469. X    if (ObjInRoom(cmd.nn))
  470. X      prints("It's already here.");
  471. X--- 560,566 ----
  472. X  /*----------------------------*/
  473. X  do_drop()
  474. X  {
  475. X!   int i;
  476. X  
  477. X    if (ObjInRoom(cmd.nn))
  478. X      prints("It's already here.");
  479. X***************
  480. X*** 589,596 ****
  481. X  /*----------------------------*/
  482. X  do_throw()
  483. X  {
  484. X-   char *s;
  485. X- 
  486. X    if (ObjInRoom(cmd.nn))
  487. X      prints("It's already here.");
  488. X  
  489. X--- 598,603 ----
  490. X***************
  491. X*** 1509,1533 ****
  492. X    char s[80];
  493. X  
  494. X    cprintf("Filename to save game to: ");
  495. X!   gets( s );
  496. X!   if (!*s) return;
  497. X  
  498. X    f=fopen(s,"w");
  499. X    if (f)
  500. X    {
  501. X      for ( i=1; i<MaxObjs; i++ )
  502. X!       fprintf( f, "%d ", obj[i].loc );
  503. X  
  504. X!     fprintf( f, "%d %d %d %d %d %d ",
  505. X        curr_lev, curr_loc,
  506. X        level_loc[1], level_loc[2], level_loc[3], sleep_lev );
  507. X  
  508. X!     fprintf( f, "%d %d %d %d %d %d %d %d %d %d %d %d ",
  509. X        cc, wa, ep, dr, af, gp, mi, ti, kp, dc[0], dc[1], dc[2] );
  510. X  
  511. X      putc( '\n', f );
  512. X!     fclose( f );
  513. X!     prints("Game saved.");
  514. X    }
  515. X    else
  516. X    {
  517. X--- 1516,1541 ----
  518. X    char s[80];
  519. X  
  520. X    cprintf("Filename to save game to: ");
  521. X!   (void)eofgets(s,80,stdin);
  522. X!   if (s[0] == '\n') return;
  523. X!   else strip_nl(s);
  524. X  
  525. X    f=fopen(s,"w");
  526. X    if (f)
  527. X    {
  528. X      for ( i=1; i<MaxObjs; i++ )
  529. X!       (void)fprintf( f, "%d ", obj[i].loc );
  530. X  
  531. X!     (void)fprintf( f, "%d %d %d %d %d %d ",
  532. X        curr_lev, curr_loc,
  533. X        level_loc[1], level_loc[2], level_loc[3], sleep_lev );
  534. X  
  535. X!     (void)fprintf( f, "%d %d %d %d %d %d %d %d %d %d %d %d ",
  536. X        cc, wa, ep, dr, af, gp, mi, ti, kp, dc[0], dc[1], dc[2] );
  537. X  
  538. X      putc( '\n', f );
  539. X!     if (fclose(f)) perror("Error saving game: ");
  540. X!     else prints("Game saved.");
  541. X    }
  542. X    else
  543. X    {
  544. X***************
  545. X*** 1543,1569 ****
  546. X    char s[80];
  547. X  
  548. X    cprintf("Filename to load game from: ");
  549. X!   gets( s );
  550. X!   if (!*s) return;
  551. X  
  552. X    f=fopen(s,"r");
  553. X    if (f)
  554. X    {
  555. X      for ( i=1; i<MaxObjs; i++ )
  556. X!       fscanf( f, "%d ", &obj[i].loc );
  557. X  
  558. X!     fscanf( f, "%d %d %d %d %d %d ",
  559. X        &curr_lev, &curr_loc,
  560. X!       &level_loc[1], &level_loc[2], &level_loc[3], &sleep_lev );
  561. X  
  562. X!     fscanf( f, "%d %d %d %d %d %d %d %d %d %d %d %d ",
  563. X!       &cc, &wa, &ep, &dr, &af, &gp, &mi, &ti, &kp, &dc[0], &dc[1], &dc[2] );
  564. X  
  565. X      for ( sum=0, i=0; i<3; i++ )
  566. X        sum += dc[i];
  567. X  
  568. X!     fclose( f );
  569. X!     prints("Game loaded.");
  570. X      print_room = 1;
  571. X    }
  572. X    else
  573. X--- 1551,1579 ----
  574. X    char s[80];
  575. X  
  576. X    cprintf("Filename to load game from: ");
  577. X!   (void)eofgets(s,80,stdin);
  578. X!   if (s[0] == '\n') return;
  579. X!   else strip_nl(s);
  580. X  
  581. X    f=fopen(s,"r");
  582. X    if (f)
  583. X    {
  584. X      for ( i=1; i<MaxObjs; i++ )
  585. X!       if(fscanf( f, "%d ", &obj[i].loc ) != 1) goto erred;
  586. X  
  587. X!     if(fscanf( f, "%d %d %d %d %d %d ",
  588. X        &curr_lev, &curr_loc,
  589. X!       &level_loc[1],&level_loc[2],&level_loc[3],&sleep_lev)!=6) goto erred;
  590. X  
  591. X!     if(fscanf( f, "%d %d %d %d %d %d %d %d %d %d %d %d ",
  592. X!       &cc, &wa, &ep, &dr, &af, &gp, &mi, &ti, &kp, &dc[0], &dc[1], &dc[2] )
  593. X!        != 12) goto erred;
  594. X  
  595. X      for ( sum=0, i=0; i<3; i++ )
  596. X        sum += dc[i];
  597. X  
  598. X!     if (fclose(f)) perror("Error closing save file: ");
  599. X!     else prints("Game loaded.");
  600. X      print_room = 1;
  601. X    }
  602. X    else
  603. X***************
  604. X*** 1570,1575 ****
  605. X--- 1580,1589 ----
  606. X    {
  607. X      cprintf("Unable to load game from %s", s); nl();
  608. X    }
  609. X+  return;
  610. X+  erred:
  611. X+   prints("load: save file of inconsistent format");
  612. X+   exit(1);
  613. X  }
  614. X  
  615. X  /*----------------------------*/
  616. X***************
  617. X*** 1712,1723 ****
  618. X        flag = stack_say("sonic harmony present.");
  619. X  
  620. X      if (!flag)
  621. X!       stack_say("nothing special to report.");
  622. X    }
  623. X  
  624. X    else
  625. X    {
  626. X!     stack_say( "" );
  627. X      switch ( cmd.nn )
  628. X      {
  629. X        case o_mirror:
  630. X--- 1726,1737 ----
  631. X        flag = stack_say("sonic harmony present.");
  632. X  
  633. X      if (!flag)
  634. X!       (void)stack_say("nothing special to report.");
  635. X    }
  636. X  
  637. X    else
  638. X    {
  639. X!     (void)stack_say( "" );
  640. X      switch ( cmd.nn )
  641. X      {
  642. X        case o_mirror:
  643. X***************
  644. X*** 2069,2093 ****
  645. X        else
  646. X        {
  647. X          prints(
  648. X!         "As the complex disintegrates around you, the stack, sensing your\n");
  649. X          prints(
  650. X!         "danger, overloads all it's circuits to regain a moment's control.\n");
  651. X          prints(
  652. X!         "With a final burst of energy, the stack implodes, projecting a\n");
  653. X          prints(
  654. X!         "stasis field around you that protects you from the destruction.\n");
  655. X          prints(
  656. X!         "...\n");
  657. X          prints(
  658. X!      "From the smoldering debris of the Doomsday complex you pick up the\n");
  659. X          prints(
  660. X!         "pieces of the stack and reflect on how as you risked your life to\n");
  661. X          prints(
  662. X!      "save Earth, the stack has given its own to save yours.  As you walk\n");
  663. X          prints(
  664. X!         "away, you solemnly swear to repair the stack, for the adventures\n");
  665. X          prints(
  666. X!         "that lie ahead.\n"
  667. X          );
  668. X        }
  669. X        break;
  670. X--- 2083,2107 ----
  671. X        else
  672. X        {
  673. X          prints(
  674. X!         "As the complex disintegrates around you, the stack, sensing your");
  675. X          prints(
  676. X!         "danger, overloads all it's circuits to regain a moment's control.");
  677. X          prints(
  678. X!         "With a final burst of energy, the stack implodes, projecting a");
  679. X          prints(
  680. X!         "stasis field around you that protects you from the destruction.");
  681. X          prints(
  682. X!         "...");
  683. X          prints(
  684. X!      "From the smoldering debris of the Doomsday complex you pick up the");
  685. X          prints(
  686. X!         "pieces of the stack and reflect on how as you risked your life to");
  687. X          prints(
  688. X!      "save Earth, the stack has given its own to save yours.  As you walk");
  689. X          prints(
  690. X!         "away, you solemnly swear to repair the stack, for the adventures");
  691. X          prints(
  692. X!         "that lie ahead."
  693. X          );
  694. X        }
  695. X        break;
  696. X***************
  697. X*** 2142,2153 ****
  698. X  
  699. X  intro()
  700. X  {
  701. X!   int i,j,k;
  702. X  
  703. X    clrscr();
  704. X    intro1();
  705. X!   prints("Press <Enter> to continue");
  706. X!   i=get_enter();
  707. X    clrscr();
  708. X  
  709. X    prints("Scenario:");
  710. X--- 2156,2170 ----
  711. X  
  712. X  intro()
  713. X  {
  714. X!   int ch;
  715. X  
  716. X    clrscr();
  717. X    intro1();
  718. X!   do {
  719. X!     prints("Scenario and instructions? ");
  720. X!     (void)eofgets(cmd.cm,max_cmd_size,stdin);
  721. X!     if ((ch=intlwr(cmd.cm[0]))=='n' || ch == '\n') return;
  722. X!   } while (ch != 'y');
  723. X    clrscr();
  724. X  
  725. X    prints("Scenario:");
  726. X***************
  727. X*** 2182,2198 ****
  728. X    prints("");
  729. X  
  730. X    prints("Press <Enter> to begin");
  731. X!   j=get_enter();
  732. X    clrscr();
  733. X-   srand( i*i + j + k );
  734. X  }
  735. X  
  736. X  /*------------------------------------------------------------*/
  737. X! main()
  738. X  {
  739. X!   int i, keep_playing;
  740. X  
  741. X!   intro();
  742. X  
  743. X    do
  744. X    {
  745. X--- 2199,2222 ----
  746. X    prints("");
  747. X  
  748. X    prints("Press <Enter> to begin");
  749. X!   (void)eofgets(cmd.cm,max_cmd_size,stdin);
  750. X    clrscr();
  751. X  }
  752. X  
  753. X  /*------------------------------------------------------------*/
  754. X! main(argc,argv)
  755. X! int argc;
  756. X! char *argv[];
  757. X! 
  758. X  {
  759. X!   int l, fast = 0, keep_playing;
  760. X  
  761. X!   for (l=1; l < argc; l++) {
  762. X!     if(fast=(strcmp(argv[l],"-f")==0)) break;
  763. X!   }
  764. X!   if ((argc == 2 && !fast) || argc > 2)
  765. X!     prints("Only -f for fast start-up is allowed.  Unknown options ignored.\n");
  766. X!   if (!fast) intro();
  767. X  
  768. X    do
  769. X    {
  770. X***************
  771. X*** 2219,2230 ****
  772. X  #endif
  773. X  
  774. X        if (InDreamWorld( curr_loc ))
  775. X!         printf("(sleeping) ");
  776. X        else if (InBookWorld( curr_loc ))
  777. X!         printf("(reading) ");
  778. X  
  779. X        cprintf("Enter command: ");
  780. X!       gets( cmd.cm );
  781. X        if (cmd.cm[0])
  782. X        {
  783. X          AnalyseCommand( &cmd );
  784. X--- 2243,2254 ----
  785. X  #endif
  786. X  
  787. X        if (InDreamWorld( curr_loc ))
  788. X!         (void)printf("(sleeping) ");
  789. X        else if (InBookWorld( curr_loc ))
  790. X!         (void)printf("(reading) ");
  791. X  
  792. X        cprintf("Enter command: ");
  793. X!       strip_nl(eofgets(cmd.cm,max_cmd_size,stdin));
  794. X        if (cmd.cm[0])
  795. X        {
  796. X          AnalyseCommand( &cmd );
  797. X***************
  798. X*** 2237,2248 ****
  799. X      Ending( zap );
  800. X      nl();
  801. X      cprintf("Play again (y/n)? ");
  802. X!     gets( cmd.cm );
  803. X!     keep_playing = (cmd.cm[0]!='n' && cmd.cm[0] !='N');
  804. X      nl();
  805. X    }
  806. X    while ( keep_playing );
  807. X    clrscr();
  808. X-   intro1();
  809. X  }
  810. X  
  811. X--- 2261,2271 ----
  812. X      Ending( zap );
  813. X      nl();
  814. X      cprintf("Play again (y/n)? ");
  815. X!     (void)eofgets(cmd.cm,max_cmd_size,stdin);
  816. X!     keep_playing = (intlwr(cmd.cm[0])!='n');
  817. X      nl();
  818. X    }
  819. X    while ( keep_playing );
  820. X    clrscr();
  821. X  }
  822. X  
  823. X*** tess.doc    Mon Dec 12 11:17:08 1988
  824. X--- tess/tess.doc    Mon Dec 12 11:21:41 1988
  825. X***************
  826. X*** 34,37 ****
  827. X--- 34,40 ----
  828. X    so if one word doesn't work, try another.
  829. X  
  830. X+   The game also accepts an argument of -f at run-time for fast start-up.
  831. X+   This skips the title screen, scenario and instructions.  Very useful
  832. X+   for people at lower baud rates.
  833. X  
  834. X  Notes:
  835. END_OF_FILE
  836. if test 17604 -ne `wc -c <'patches01'`; then
  837.     echo shar: \"'patches01'\" unpacked with wrong size!
  838. fi
  839. # end of 'patches01'
  840. fi
  841. echo shar: End of shell archive.
  842. exit 0
  843.